package com.example.xlzx.result;

import lombok.Getter;

/**
 * 统一返回结果状态信息类
 */
@Getter
public enum ResultCodeEnum {

    SUCCESS(200, "成功"),
    FAIL(201, "失败"),


    XLZX_LOGIN_AUTH(305, "未登录"),
    XLZX_ACCOUNT_NOT_EXIST_ERROR(306, "用户不存在"),
    XLZX_ACCOUNT_ERROR(307, "密码错误"),
    XLZX_ACCOUNT_EXIST_ERROR(308,"用户已存在"),
    LOGGED_IN_ON_ANOTHER_DEVICE(320,"账号已经在其他设备登录"),
    TOKEN_EXPIRED(601, "token过期"),
    TOKEN_INVALID(602, "token非法")
   ;


    private final Integer code;

    private final String message;

    ResultCodeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
}
